package com.lifecycle.builder;

import com.claims.UserClaimsApply;

/**
 * Created by 峥桂 on 2017/6/7.
 */
public class Client {
    public static void main(String[] args){
        UserClaimsApply userClaimsApply=new UserClaimsApply();

        userClaimsApply.setHandlestatus(100);
        handler(new MealA(),userClaimsApply);

        userClaimsApply.setHandlestatus(200);
        handler(new MealB(),userClaimsApply);

        userClaimsApply.setHandlestatus(201);
        handler(new MealB(),userClaimsApply);

    }
    private static void handler(MealBuilder a,UserClaimsApply userClaimsApply){
        //服务员
        KFCWaiter waiter = new KFCWaiter();
        //套餐A
        //服务员准备套餐A
        waiter.setMealBuilder(a);
        //获得套餐
        Meal mealA = waiter.construct(userClaimsApply);
    }


}